<template>
    <div id="app">
      <header>
        <nav>
          <router-link to="/">首页</router-link>
          <router-link to="/profile">个人中心</router-link>
          <router-link to="/login">登录</router-link>
          <router-link to="/register">注册</router-link>
        </nav>
      </header>
      <main>
        <router-view></router-view>
      </main>
    </div>
  </template>
  
  <script>
  export default {
    name: 'App'
  };
  </script>
  
  <style>
  #app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #2c3e50;
    margin: 0;
    padding: 0;
  }
  
  header {
    background-color: #42b983;
    padding: 10px 0;
    text-align: center;
  }
  
  nav {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  
  nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
  }
  
  nav a.router-link-exact-active {
    background-color: #2c3e50;
  }
  
  nav a:hover {
    background-color: #35495e;
  }
  
  main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
  }
  </style>